home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d20 / robo_037.com / ROBO.CTL < prev    next >
Text File  |  1988-11-07  |  15KB  |  316 lines

  1. ; ╔════════════════════════════════════════════════════════════════════════╗
  2. ; ║ φ           SAMPLE CONTROL FILE for the program, ROBO                φ ║
  3. ; ╟────────────────────────────────────────────────────────────────────────╢
  4. ; ║                                                                        ║
  5. ; ║  This sample control file is for use with the ROBO mass mailing        ║
  6. ; ║  program and is for tutorial purposes only.  It is not meant to        ║
  7. ; ║  do anything useful and is not necessarily correct for direct use.     ║
  8. ; ║  Read the ROBO documentation for a proper understanstaing of how       ║
  9. ; ║  this control is used and how ROBO operates.                           ║
  10. ; ║                                                                        ║
  11. ; ╟────────────────────────────────────────────────────────────────────────╢
  12. ; ║ φ     Copyright (C) 1988 by Tom Kashuba *  ALL RIGHTS RESERVED       φ ║
  13. ; ╚════════════════════════════════════════════════════════════════════════╝
  14.  
  15.  
  16. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  17. ;  COMMON CONTROL SECTION
  18. ;
  19. ;  This following control file section is ALWAYS executed because it
  20. ;  precedes any GROUP label.  It is recommended that you set up such
  21. ;  a common area for the definition of those items that are common to
  22. ;  any subsequent control GROUPs.
  23. ;
  24. ;  NOTE: You do NOT need to use GROUPs.  Since everything in this initial
  25. ;        section is ALWAYS executed, you could place all of the commands
  26. ;        necessary to compose and send a message and/or files in this
  27. ;        section and it will be executed when you run ROBO without any
  28. ;        command line arguments.
  29.  
  30.    MAIL     .\                               ; Where to put messages
  31.    OUTBOUND .\                               ; Where to put file lists
  32.  
  33.    FROM  1:999/1 "Your Name"                 ; Your address and name
  34.  
  35.  
  36. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  37. ;  GROUP: Sample1 .... Only run when "ROBO SAMPLE1" is executed.
  38. ;
  39. ;  o Sends only message text to three addresses.
  40. ;  o Addresses defined within control file.
  41. ;  o Text defined within control file.
  42.  
  43. GROUP Sample1
  44.  
  45.    TO    999/1   "Wanda Waxley"              ; Def TO:
  46.    TO    222/2 Rona_Revlon                   ; Def TO:
  47.    TO    997/4   "Mel Mullusk"               ; Def TO:
  48.  
  49.    SUBJ  "Robo Test: Message only"           ; Set SUBJ:
  50.  
  51.    TEXT                                      ; Use external message text.
  52.    This is a ROBO test message created by running ROBO's Sample1
  53.    which sent one message to three addresses.
  54.    ENDTEXT
  55.  
  56.    SEND                                      ; All set.  Now do it!
  57.  
  58.  
  59. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  60. ;  GROUP: Sample2 .... Only run when "ROBO SAMPLE2" is executed.
  61. ;
  62. ;  o Sends two files to three addresses without message.
  63. ;  o Files defined within control file.
  64. ;  o Addresses defined within control file.
  65.  
  66. GROUP Sample2
  67.  
  68.    FILE  .\Robo.Prn                          ; Def File to Send
  69.    FILE  .\Robo.Reg                          ; Def File to Send
  70.  
  71.    TO    999/1    "Wanda Waxley"             ; Def TO:
  72.    TO    998/2    Rona_Revlon                ; Def TO:
  73.    TO    2:345/67 "Mel Mullusk"              ; Def TO: (note: Zone 2)
  74.  
  75.    SUBJ  "Robo Test: 3 files only"           ; Set SUBJ:
  76.  
  77.    SEND                                      ; All set.  Now do it!
  78.  
  79.  
  80. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  81. ;  GROUP: Sample3 .... Only run when "ROBO SAMPLE3" is executed.
  82. ;
  83. ;  o Sends message + two files to three addresses.
  84. ;  o Files defined within control file.
  85. ;  o Addresses defined in external file.
  86.  
  87. GROUP Sample3
  88.  
  89.    FILE  .\Robo.Prn                          ; Def File to Send
  90.    FILE  .\Robo.Reg                          ; Def File to Send
  91.  
  92.    TO    LIST Send.Lst                       ; Def TO: (external list)
  93.  
  94.    SUBJ  "Robo Test: Msg + 3 files"          ; Set SUBJ:
  95.  
  96.    TEXT                                      ; Use external message text.
  97.    This is a ROBO test message created by running ROBO's Sample1
  98.    which sent two files to an external list of addresses.
  99.    ENDTEXT
  100.    SEND                                      ; Compose msgs/file lists
  101.    EXIT                                      ; Skips rest of control file
  102.  
  103. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  104. ;  GROUP: Sample4 .... Only run when "ROBO SAMPLE4" is executed.
  105. ;
  106. ;  This sample control group is very complex since it makes full-blown
  107. ;  use of many of ROBO's more advanced commands.  Because of this, it
  108. ;  would difficult (nor wise) to make it easily executable on the test
  109. ;  directory where you have placed ROBO.  For this reason, an EXIT
  110. ;  command has been inserted immediately after the GROUP label so that
  111. ;  if anyone were fool-hardy enough to run it as is, the sample will
  112. ;  just exit yet any GROUP that you may append to this file would still
  113. ;  be executable as the EXIT in this group would be skipped over.
  114. ;
  115. ;  Study this group as an example, review the commands, correlate what
  116. ;  you see with the ROBO documentation and, ONLY THEN, attempt to alter
  117. ;  this sample into a form that addresses your particular environment.
  118. ;
  119. ;  As set up, it does EVERYTHING in the current directory which prevents
  120. ;  it from ever working correctly but, in this way, allows it to act as
  121. ;  a skeleton for direct adaptation to your own environment.
  122. ;
  123. ;  Were it to have been structured for proper execution in the current
  124. ;  directory, then it would not have been reflective of a real life
  125. ;  scenario and its raison d'etre would have been lost.
  126. ;
  127. ;  The sample group is or does ...
  128. ;
  129. ;  o Tour de force - Bells and Whistles - Full Tilt Boogie
  130. ;  o Checks to see if a NODEDIFF file has been received
  131. ;
  132. ;  o If found ...
  133. ;
  134. ;    - Moves it to proper directory(ies).
  135. ;    - Copies it to a general directory for MAGIC name FiReq's
  136. ;    - Checks that copy worked by file check of destination dir
  137. ;
  138. ;    - If COPY worked
  139. ;
  140. ;      ... Delete original
  141. ;      ... Adds NODEDIFF.A## to proper FILES.BBS
  142. ;      ... Finally: Compose and Send File to list with text
  143. ;                   Note use of both inlin & external address list
  144. ;      ... Runs XLAXDIFF to update raw nodelist
  145. ;      ... Runs XLAXNODE to compile binary nodelist
  146. ;      ... Archives new raw nodelist to proper director(ies)
  147. ;      ... Adds NODELIST.A## entry to proper FILES.BBS
  148. ;
  149. ;  I told you it was a "tour de force", didn't I?
  150. ;
  151. ;
  152. GROUP Sample4
  153.  
  154.    EXIT      ; <=== This statement prevents THIS group from running.
  155.  
  156.    DISP ""
  157.    DISP "╔═════════════════════════════╕"
  158.    DISP "║  Executing DIFF processing  │"
  159.    DISP "╙─────────────────────────────┘"
  160.    DISP ""
  161.  
  162. ;  ............................................................
  163. ;  First, see if the weekly nodediff has arrived.
  164. ;  ............................................................
  165.  
  166.    disp "if exist c:\netfiles\nodediff.a{j5d2}"
  167.    if exist c:\netfiles\nodediff.a{j5d2}
  168.  
  169. ;     .............................................................
  170. ;     : It's HERE!  Copy to its download dir for user access.     :
  171. ;     : This is optional if you don't run a BBS or have  a        :
  172. ;     : a dir dedicated to keeping FidoNet type files.            :
  173. ;     :...........................................................:
  174.  
  175.       DISP "Found/Moving: {fp}\{fn} to c:\fidonet"
  176.       shell "copy {fp}\{fn} c:\fidonet\*.*"
  177.  
  178. ;     ...................................................................
  179. ;     : Most distributors of FidoNet files, like IC's, RC's and         :
  180. ;     : some DC's, maintain a separate dir for copies of of only        :
  181. ;     : the latest network files like NODELIST.A??, NODEDIFF.A??        :
  182. ;     : and FNEWS???.ARC.                                               :
  183. ;     :                                                                 :
  184. ;     : For such setups, we delete any existing generation of our       :
  185. ;     : just received NODEDIFF so that this file, once copied there,    :
  186. ;     : will be the only one sent in response to a generic (wildcarded) :
  187. ;     : or aliased (Magic named) file request.                          :
  188. ;     :.................................................................:
  189.  
  190.       DISP "Deleting c:\fidoweek\nodediff.*"
  191.       shell "del c:\fidoweek\nodediff.*"
  192.  
  193. ;     .................................................................
  194. ;     : Now we copy the received file to this latest issue directory. :
  195. ;     :...............................................................:
  196.  
  197.       DISP "Copying {fp}\{fn} to c:\fidoweek"
  198.       shell "copy {fp}\{fn} c:\fidoweek\*.*"
  199.  
  200. ;     ............................................................
  201. ;     : We now check to see if our received file is, indeed, in  :
  202. ;     : the destination directory before burning any bridges.    :
  203. ;     :..........................................................:
  204.  
  205.       if exist c:\fidonet\{fn}
  206.  
  207. ;        ....................................................
  208. ;        : If we're here, it's there!  Delete the original! :
  209. ;        ....................................................
  210. ;        : WARNING: Use of the file name macros can be very :
  211. ;        : dangerous.  They ALWAYS have the values of the   :
  212. ;        : LAST 'IF EXIST' statement which may be different :
  213. ;        : than what you first think.  See docs on macros!  :
  214. ;        : With that in mind, please note how I sometimes   :
  215. ;        : use an explicit path rather than the path macro  :
  216. ;        : which might have the path of the last EXITS and  :
  217. ;        : not the one I really want.                       :
  218. ;        :..................................................:
  219.  
  220.          DISP "Deleting: c:\netfiles\{fn}"
  221.          shell "del c:\netfiles\{fn}"
  222.  
  223. ;        ............................................................
  224. ;        : Since I have a download directory for an infosystem that :
  225. ;        : uses FILES.BBS as a file list, we use the FLAP command   :
  226. ;        : to update that file list with its new resident.          :
  227. ;        :..........................................................:
  228.  
  229.          DISP "Updating c:\fidonet\files.bbs"
  230.          FLAP "c:\fidonet\files.bbs" "<NODEDIFF" "{ff} {ymd} EDITNL input file: Brings NODELIST to j.{j5d3} -robo"
  231.  
  232. ;        .............................................................
  233. ;        : Ok, finally time to send the file attach with appropriate :
  234. ;        : message to our list of NODEDIFF recipients                :
  235. ;        :...........................................................:
  236.  
  237.          DISP "Sending {fp}\{fn} ..."
  238.          FROM  1:999/0 "R999 Coordinator"
  239.          SUBJ "Weekly NodeDiff Update"
  240.  
  241. ;        ............................................................
  242. ;        : I use the TRACK option below to avoid re-sending what    :
  243. ;        : my source might have sent me in duplicate.  It's only    :
  244. ;        : one dupe to me but umpteen dupes sent out if not caught! :
  245. ;        :..........................................................:
  246.  
  247.          FILE {fp}\{fn} track                   ; Note: TRACK option!
  248.          TO LIST Send.Lst                       ; Recipient list
  249.          TO 999/123 "Extra someone"             ; Some extra person
  250.  
  251.          SET PRIVATE KILL
  252.  
  253. ;        ...................................................
  254. ;        : Here's a cutesy message to announce the arrival :
  255. ;        : of the all-important weekly file.               :
  256. ;        :.................................................:
  257.  
  258.          TEXT
  259.      Here's your latest NodeDiff file to update your NodeList
  260.      for use with Editnl or compatible.
  261.  
  262.      Voici le 'NodeDiff' pour modifier votre 'NodeList' avec
  263.      the programme 'EditNl' ou compatible.
  264.    ...........................................................
  265.  
  266.     This NodeDIFF ---.     .--------.
  267.                       >--> | UPDATE | ---> Current
  268.     Last Nodelist ---'     `--------'      NodeList
  269.                           .----------.         |
  270.     Working Files <-------| COMPILER | <-------'
  271.                           `----------'
  272.    ...........................................................
  273.     The Boss, Coord, Region 999, Lower East PoDunk, 999/0
  274.          ENDTEXT
  275.  
  276.          SEND
  277.  
  278. ;        .........................................................
  279. ;        : Ok, here's a little extra-curricular activity wherein :
  280. ;        : we shell out to actually run a nodelist processor,    :
  281. ;        : update our current nodelist, arc up that result and   :
  282. ;        : place it in appropriate places, and update any        :
  283. ;        : applicable FILES.BBS                                  :
  284. ;        :.......................................................:
  285.  
  286.          DISP "Updating NodeList"
  287.          shell "cd c:\netinfo"
  288.          shell "pkxarc c:\fidoweek\{fn}"
  289.          shell "xlaxdiff"
  290.          shell "del c:\fidoweek\nodelist.*"
  291.          shell "pkarc /oct a c:\fidonet\nodelist.a{j5d2} nodelist.{j5d3}"
  292.          shell "copy c:\fidonet\nodelist.a{j5d2} c:\fidoweek\*.*"
  293.          shell "cd \netinfo"                  ; Hmmm, Seems superfluous!
  294.          FLAP "c:\fidonet\files.bbs" "<NODELIST" "NODELIST.A{j5d2} {ymd} Latest NodeList -robo"
  295.  
  296.       endif ; copied ok
  297.  
  298.    endif ; nodediff found
  299.  
  300. ;..........................................................................
  301. ;  Supplementary note on Sample4                                          :
  302. ;                                                                         :
  303. ;  Upon reviewing this skeleton which is based upon my own particular     :
  304. ;  setup, I realized that it is entirely possible to use the FLAP command :
  305. ;  to directly alter any "OK FILES" list that your system might support   :
  306. ;  to directly overlay the any existing entry for the nodediff and/or     :
  307. ;  nodelist files.                                                        :
  308. ;                                                                         :
  309. ;  This would obviate the need for a separate directory for weekly files  :
  310. ;  by dynamically altering the available files spec into a form that      :
  311. ;  reflects the current week's file names.  I leave the the execution of  :
  312. ;  this idea to the more adventurous as I have a migraine at the moment.  :
  313. ;  <laugh ... ouch!>           -kash                                      :
  314. ;.........................................................................:
  315.  
  316.